<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'contact-form',
	'enableClientValidation'=>FALSE,
	'clientOptions'=>array(
		'validateOnSubmit'=>FALSE,
	),
        'htmlOptions'=>array('class'=>'definewidth m20 form-horizontal')
)); ?>
<table class="table table-bordered table-hover m10">
    <?php echo $form->errorSummary($model);?>
    <tr>
        <td width="10%" class="tableleft">选择章名称</td>
        <td>
            <?php echo $form->dropdownList($model,'chapter_id',$chapter)?>
        </td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">名称</td>
        <td>
            <?php echo $form->textField($model,'name'); ?>
            <?php echo $form->error($model,'name'); ?>
        </td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">排序</td>
        <td>
            <?php echo $form->dropdownlist($model,'sequence',Yii::app()->params['verse']); ?>
            <?php echo $form->error($model,'sequence'); ?>
        </td>
    </tr>
    <tr>
        <td class="tableleft">状态</td>
        <td>
            <?php
                $radio=CHtml::activeRadioButtonList($model, 'state', array('0'=>'禁用','1'=>'启用'),     array('template'=>'{input}{label}','separator'=>"    "));
                $radio= str_replace("<label", "<span", $radio);  
                $radio= str_replace("</label", "</span", $radio);  
                echo $radio;      
            ?>
             <?php echo $form->error($model,'state'); ?>
<!--            <input type="radio" name="status" value="0" checked/> 启用
            <input type="radio" name="status" value="1"/> 禁用-->
        </td>
    </tr>
    <tr>
        <td class="tableleft"></td>
        <td>
            <button type="submit" class="btn btn-primary" type="button">保存</button> &nbsp;&nbsp;<a class="btn btn-success" name="backid" id="backid" href="<?php echo $this->createUrl('/chapter');?>">返回列表</a>
        </td>
    </tr>
</table>

<?php $this->endWidget(); ?>
</div>